#include<iostream>
using namespace std;

int main()
{
	int input = 0, sum = 0;
	cin >> input;
	while (input != 0)
	{
		sum += input;
		cin >> input;
	}
	cout << sum;
	return 0;
}
